package com.example.demo2_review.use_atvalue;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author zwp14
 * @create 2024/7/13 15:39
 * @description
 */
@Slf4j
@RestController
@RequestMapping("/value")
public class ValueController {

    @Value("${student}")
    private String student;
    @Value("${user.info.name}")
    private String name;
    @Value("${user.info.age}")
    private Integer age;

    @GetMapping("/test")
    public void show(){
        System.out.println(age);
        log.info(student);
        log.info(name);
        log.info("age:{}",age);
    }
}
